import request from '@/utils/request'

// 封装
// get 获取 post 新增 put 修改 delete 删除 http四个最常用的动词
// get delete -> 参数写在params中
// put post -> data

/**
 *注册
 * @param {username,password} data
 *
 */
// 注册
export const register = (data) => {
  return request({
    method: 'POST',
    url: 'user/register',
    // data: data 下面是简写
    data
  })
}
// 登录
export const login = (data) => {
  return request({
    method: 'POST',
    url: 'user/login',
    // data: data 下面是简写
    data
  })
}
